package com.newtouch.cq.common.web.controller;

import com.newtouch.cq.common.web.service.ICommonService;
import com.newtouch.cq.lang.annotation.NoLog;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Alex
 * @Description 无需登录通用接口
 * @time 2021/8/19 15:24
 */
@RestController
@RequestMapping("/common")
@Api(tags = "通用接口文档")
public class CommonController {

    @Autowired
    private ICommonService commonService;

    /**
     * 获取图片验证码
     */
    @NoLog
    @GetMapping("pictCode")
    @ApiOperation("获取图片验证码")
    @ApiImplicitParam(name = "randomKey", value = "随机标识码", dataTypeClass = String.class)
    public void pictCode(String randomKey) {
        commonService.pictCode(randomKey);
    }
}
